package com.fr.report.script.function;

import com.fr.base.ColumnRow;
import com.fr.report.script.Calculator;
import com.fr.report.script.Function;
import com.fr.report.script.Function.Type;
import com.fr.report.script.NormalFunction;

public class ROW extends NormalFunction
{
  public Object run(Object[] paramArrayOfObject)
  {
    ColumnRow localColumnRow = null;
    Calculator localCalculator = getCalculator();
    if (localCalculator != null)
      localColumnRow = localCalculator.getCurrentColumnRow();
    return new Integer(0);
  }

  public Function.Type getType()
  {
    return Function.REPORT;
  }

  public String getCN()
  {
    return "ROW()返回当前单元格的行号，必须使用于条件属性中\n示例:\n如果当前单元格为A5，在A5中写入\"=ROW()\"则返回5。\n如果当前单元格为B8，在B8中写入\"=ROW()\"则返回8。";
  }

  public String getEN()
  {
    return "";
  }
}